<template>
  <div>
    <h1>这是我的根组件</h1>
    <Header></Header>
    <h2>{{ time | fortime }}</h2>
  </div>
</template>

<script>
import Header from "./components/Header.vue";
import moment from "moment";
export default {
  name: "nihao",
  components: { Header },
  data() {
    return {
      time: Date.now(),
    };
  },
  filters: {
    fortime(value) {
      return moment(value).format("YYYY-MM-DD");
    },
  },
};
</script>

<style lang="less" scoped></style>
